import VueRouter from 'vue-router'

import Home from '../components/Home/Home.vue'
import Search from '../components/Search/Search.vue'
import Order from '../components/Order/Order.vue'
import My from '../components/My/My.vue'
import Major from '../components/Basics/Major.vue'
import Detailed from '../components/My/myChoice/Detailed.vue'
import Login from '../components/My/myChoice/Login.vue'
import Setusername from '../components/My/myChoice/Setusername.vue'
import Forget from '../components/My/myChoice/Forget.vue'
import shopHome from '../components/storeDetails/shopHome.vue'
import xiazai from '../components/My/xiazai.vue'
import Explain from '../components/common/Explain.vue'
import shopExplain from 'components/storeDetails/shopComp/shopExplain.vue'
import Food from 'components/food/Food'
import orderDetailed from 'components/Order/orderDetailed'
var router = new VueRouter({
    routes: [{
            path: "/",
            redirect: "/major/home"
        },
        {
            path: '/major',
            component: Major,
            children: [{
                    path: 'home',
                    component: Home
                },
                {
                    path: 'search',
                    component: Search
                },
                {
                    path: 'order',
                    component: Order
                },
                {
                    path: 'my',
                    component: My
                },
            ]
        },
        {
            path: '/major/my/detailed',
            component: Detailed
        },
        {
            path: '/major/my/login',
            component: Login
        },
        {
            path: '/major/my/setusername',
            component: Setusername
        },
        {
            path: '/major/my/forget',
            component: Forget
        },
        {
            path: '/shop',
            component: shopHome
        },
        {
            path: '/xiazai',
            component: xiazai
        },
        {
            path: '/explain',
            component: Explain
        },
        {
            path: '/shop/explain',
            component: shopExplain
        },
        {
            path: '/food',
            component: Food
        },
        {
            path: '/orderdetailed',
            component: orderDetailed
        },

    ],
    linkActiveClass: 'mui-active' //改名，记过mui的激活变蓝
})
export default router